home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / Dmod / dmod_P96 / autodocs / Picasso96API.doc
Encoding:
Text File  |  2002-10-28  |  42.8 KB  |  1,112 lines

  1. TABLE OF CONTENTS
  2.  
  3. Picasso96API.library/--a brief note from us--
  4. Picasso96API.library/--background--
  5. Picasso96API.library/--bitmaps--
  6. Picasso96API.library/--color formats--
  7. Picasso96API.library/p96AllocBitMap
  8. Picasso96API.library/p96AllocModeListTagList
  9. Picasso96API.library/p96BestModeIDTagList
  10. Picasso96API.library/p96CloseScreen
  11. Picasso96API.library/p96EncodeColor
  12. Picasso96API.library/p96FreeBitMap
  13. Picasso96API.library/p96FreeModeList
  14. Picasso96API.library/p96GetBitMapAttr
  15. Picasso96API.library/p96GetBoardDataTagList
  16. Picasso96API.library/p96GetModeIDAttr
  17. Picasso96API.library/p96GetRTGDataTagList
  18. Picasso96API.library/p96LockBitMap
  19. Picasso96API.library/p96PIP_Close
  20. Picasso96API.library/p96PIP_GetTagList
  21. Picasso96API.library/p96PIP_OpenTagList
  22. Picasso96API.library/p96PIP_SetTagList
  23. Picasso96API.library/p96OpenScreenTagList
  24. Picasso96API.library/p96ReadPixel
  25. Picasso96API.library/p96ReadPixelArray
  26. Picasso96API.library/p96ReadTrueColorData
  27. Picasso96API.library/p96RectFill
  28. Picasso96API.library/p96RequestModeIDTagList
  29. Picasso96API.library/p96UnlockBitMap
  30. Picasso96API.library/p96WritePixel
  31. Picasso96API.library/p96WritePixelArray
  32. Picasso96API.library/p96WriteTrueColorData
  33. Picasso96API.library/--a brief note from us--
  34.     This documentation and the Picasso96API.library deserve some
  35.     extra work and are not complete ready. If anything is missing
  36.     or does not work as expected, send us a bug report. For direct
  37.     developer support send email to tabt@studbox.uni-stuttgart.de.
  38.  
  39. Picasso96API.library/--background--
  40.     The Picasso96API.library provides programmers with the extra
  41.     functionality needed to directly use Hi- and TrueColor bitmaps.
  42.     Most of the functions supplied are quite similar to the ones
  43.     that graphics.library offers except that they allow the use of
  44.     RGB values where graphics.library would need a pen value.
  45.     
  46.     Furthermore there are functions to lock and unlock bitmaps on
  47.     their respective cards and functions to open and close special
  48.     screens and access video overlays that some boards support. 
  49.     
  50.     If you miss a function in the Picasso96API.library, then try the
  51.     original graphics.library functions with appropriate parameters,
  52.     if this does not work, then contact the development team, please!
  53.  
  54. Picasso96API.library/--bitmaps--
  55.     In the original graphics.library, bitmaps were always planar and
  56.     could hold up to eight bitplanes. With the Picasso96 graphics
  57.     system, there is also support for chunky, hicolor and truecolor
  58.     bitmaps.
  59.     
  60.     When using Picasso96 bitmaps, never look into the BitMap structure
  61.     directly, but use the GetBitMapAttr() and p96GetBitMapAttr() query
  62.     functions. Especially the plane pointer entries are no longer valid.
  63.     Under no circumstances try to use them in any way!
  64.  
  65.     If you want to modify the bitmap memory, make sure to enclose all
  66.     those actions into pairs of matching calls to p96LockBitMap() and
  67.     p96UnlockBitMap(). Otherwise Picasso96 could move the bitmap's
  68.     image data away while you are reading or writing to it. Not only
  69.     would you lose your output, but you're likely to cause illegal
  70.     memory accesses as Picasso96 might free no longer needed memory. 
  71.     
  72.     Never assume the bitmap memory to stay at the same address between
  73.     subsequent calls to p96UnlockBitMap() and p96LockBitMap(). To make
  74.     life easier for you, you can supply a RenderInfo structure to
  75.     p96LockBitMap() which will be filled with the informations you
  76.     need.
  77.     
  78.     You can supply Picasso96 bitmaps to all system functions that
  79.     take bitmaps (like e.g. BltBitMap()), you can put it into a rastport,
  80.     you can do almost everything you can do with a native planar Amiga
  81.     bitmap.
  82.     
  83.     You really should not hold a lock on a Picasso96 bitmap while
  84.     performing any OS function on that particular bitmap as the OS
  85.     functions might move the bitmap. Deadlocks could also result
  86.     if you don't release the lock.
  87.     
  88.     Never hold any bitmap lock longer than absolutely necessary as
  89.     these locks prevent Picasso96 from performing exclusive tasks
  90.     like screen switching. Try to encapsule only a few basic drawing
  91.     operations into one pair of locking/unlocking calls.
  92.     
  93.     The only exception to the locking rules mentioned above are user
  94.     bitmaps that have been allocated by p96AllocBitMap() using the
  95.     special BMF_USERPRIVATE flag. These bitmaps are not considered
  96.     globally accessible and may never directly be associated with
  97.     viewports (i.e. they are not displayable). You may share those
  98.     bitmaps within several tasks of your program by using your own
  99.     methods of access arbitration.
  100.  
  101. Picasso96API.library/--color formats--
  102.     The Picasso96API.library supports different color formats:
  103.     Chunky:
  104.         CLUT:                 8bit chunky with palette
  105.     HiColor:
  106.         R5G5B5:              15bit HiColor (0rrrrrgggggbbbbb)
  107.         R5G5B5PC:            15bit HiColor (gggbbbbb0rrrrrgg)
  108.         B5G5R5PC:            15bit HiColor (gggrrrrr0bbbbbbgg)
  109.         R5G6B5:              16bit HiColor (rrrrrggggggbbbbb)
  110.         R5G6B5PC:            16bit HiColor (gggbbbbbrrrrrggg)
  111.         B5G6R5PC:            16bit HiColor (gggrrrrrbbbbbggg)
  112.     TrueColor:
  113.         R8G8B8:              24bit TrueColor (8 bit each)
  114.         B8G8R8:              24bit TrueColor (8 bit each)
  115.         A8R8G8B8:            32bit TrueColor ARGB (A unused alpha channel)
  116.         A8B8G8R8:            32bit TrueColor ABGR (A unused alpha channel)
  117.         R8G8B8A8:            32bit TrueColor RGBA (A unused alpha channel)
  118.         B8G8R8A8:            32bit TrueColor BGRA (A unused alpha channel)
  119.     YUV:
  120.         RGBFB_Y4U2V2:        2byte TrueColor (CCIR recommendation CCIR601)
  121.         RGBFB_Y4U1V1:        1byte TrueColor ACCUPAK (used on Cirrus GD5446)
  122.  
  123.     When plain RGB colors are used, their format is ARGB, which means that
  124.     bits 31-24 are unused, bits 23-16 hold the red part, bits 15-8 hold the
  125.     green part and bits 7-0 hold the blue part of the color.
  126.     Supplying a RGBFormat as parameter to a function uses the RGBFB_ prefix
  127.     (e.g. RGBFB_R8G8B8) unless otherwise noted.
  128.     Whenever formats are used as filters in library functions you can
  129.     combine the respective formats by the corresponding flags identified
  130.     with the RGBFF_ prefix (e.g. RGBFF_R8G8B8|RGBFF_B8G8R8 is a filter
  131.     for all 24bit true color formats).
  132.  
  133. Picasso96API.library/p96AllocBitMap
  134.     NAME
  135.         p96AllocBitMap -- Allocate a Picasso96 BitMap and its graphics memory
  136.  
  137.     SYNOPSIS
  138.         bitmap=p96AllocBitMap(SizeX, SizeY, Depth, Flags, Friend, RGBFormat)
  139.                                 d0     d1     d2     d3     a0        d7
  140.  
  141.         struct BitMap *p96AllocBitMap(ULONG, ULONG, ULONG, ULONG, 
  142.                          struct BitMap *, RGBFTYPE);
  143.  
  144.     FUNCTION
  145.         Does the same as graphics.library/AllocBitMap except that the
  146.         result is a Picasso96 chunky, hicolor or truecolor bitmap.
  147.         
  148.     INPUTS
  149.         SizeX = width in pixels
  150.         SizeY = Height in pixels
  151.         Depth = Depth, valid values are: 1-8, 15, 16, 24, 32
  152.         Flags = same as in graphics.library/AllocBitMap plus:
  153.                 BMF_USERPRIVATE which returns a static fast memory user
  154.                 bitmap that does not need to be locked for each access as
  155.                 it will never move or be accessed by graphics board hardware.
  156.         Friend = pointer to another bitmap, or NULL. If bitmap is supplied,
  157.                  the bitmap will be allocated with the same color format.
  158.         RGBFormat = used to select the color format when no friend_bitmap
  159.                     is supplied
  160.  
  161.     SEE ALSO
  162.         p96FreeBitMap(), graphics.library/AllocBitMap()
  163.  
  164. Picasso96API.library/p96AllocModeListTagList
  165.     NAME
  166.         p96AllocModeListTagList -- allocate mode list
  167.         p96AllocModeListTags -- varargs stub for p96AllocModeListTagList
  168.  
  169.     SYNOPSIS
  170.         list = p96AllocModeListTagList(Tags)
  171.          d0                             a0
  172.  
  173.         list = p96AllocModeListTags(Tag, ...)
  174.          d0                         stack
  175.  
  176.         struct List *p96AllocModeListTagList(struct TagItem *)
  177.         struct List *p96AllocModeListTags(ULONG Tag, ...)
  178.  
  179.     FUNCTION
  180.         p96AllocModeListTags() creates a list of modes according to the
  181.         supplied tags. This list is the same as internally used in
  182.         p96RequestModeIDTagList(). The user can filter this list to reject
  183.         any unwanted modes before feeding the resulting list to
  184.         p96RequestModeIDTagList(). Use p96FreeModeListTagList() to deallocate
  185.         the list.
  186.  
  187.     INPUTS
  188.         Same tags as p96RequestModeIDTagList()
  189.  
  190.     RESULT
  191.         list = modes for p96RequestModeIDTagList().
  192.  
  193.     SEE ALSO
  194.         p96FreeModeListTagList(), p96RequestModeIDTagList()
  195.  
  196. Picasso96API.library/p96BestModeIDTagList
  197.     NAME
  198.         p96BestModeIDTagList -- find DisplayID matching requested 
  199.         p96BestModeIDTags -- varargs stub for p96BestModeIDTagList
  200.  
  201.     SYNOPSIS
  202.         DisplayID = p96BestModeIDTagList(Tags)
  203.             d0                            a0
  204.  
  205.         DisplayID = p96BestModeIDTags(Tag, ...)
  206.             d0                        stack
  207.         
  208.         ULONG p96BestModeIDTagList(struct TagItem *)
  209.         ULONG p96BestModeIDTags(ULONG Tag, ...)
  210.         
  211.     FUNCTION
  212.         p96BestModeIDTagList searches the DisplayInfoDatabase for a DisplayID
  213.         which matches the user supplied requirements best.
  214.  
  215.     INPUTS
  216.         Tags = any of:
  217.             P96BIDTAG_NominalWidth       requested width
  218.             P96BIDTAG_NominalHeight      requested height
  219.             P96BIDTAG_Depth              requested depth
  220.             P96BIDTAG_FormatsAllowed     RGBFormats which are ok
  221.             P96BIDTAG_FormatsForbidden   RGBFormats which have to be rejected
  222.             P96BIDTAG_VideoCompatible    set TRUE to allow only modes that
  223.                                          are video compatible (e.g. Pablo)  
  224.             P96BIDTAG_PabloIVCompatible  set TRUE to allow only modes that
  225.                                          can be used for output on PabloIV
  226.             P96BIDTAG_PalomaIVCompatible set TRUE to allow only modes that
  227.                                          can display PalomaIV input
  228.  
  229.     RESULT
  230.         DisplayID = a valid DisplayID or INVALID_ID
  231.  
  232.     SEE ALSO
  233.         p96RequestModeIDTagList()
  234.  
  235. Picasso96API.library/p96CloseScreen
  236.     NAME
  237.         p96CloseScreen -- Close a Picasso96API screen
  238.  
  239.     SYNOPSIS
  240.         success = p96CloseScreen(screen)
  241.            d0                      a0
  242.  
  243.         BOOL p96CloseScreen(struct Screen *)
  244.  
  245.     FUNCTION
  246.         Closes a screen opened with p96OpenScreenTagList(). The main
  247.         difference to intuition.library/CloseScreen is, that this
  248.         function also deallocates extra handles and structures allocated
  249.         by p96OpenScreenTagList() which are used internally.
  250.  
  251.     INPUTS
  252.         screen = pointer to a Picasso96API-screen.
  253.  
  254.     NOTE
  255.         DO NEVER CALL intuition.library's CloseScreen() function with screens
  256.         that have been opened by p96OpenScreenTagList() !!!
  257.  
  258.     RESULT
  259.         success = returns TRUE (1) if screen could be successfully closed.
  260.  
  261.     SEE ALSO
  262.         p96OpenScreenTagList(), intuition.library/CloseScreen()
  263.  
  264. Picasso96API.library/p96EncodeColor
  265.     NAME
  266.         p96EncodeColor -- Convert color value to destination RGB format
  267.  
  268.     SYNOPSIS
  269.         value=p96EncodeColor(RGBFormat, Color)
  270.                                 d0       d1
  271.         
  272.         ULONG p96EncodeColor(RGBFTYPE, ULONG);
  273.  
  274.     FUNCTION
  275.         Converts an ARGB color value to the specified RGB format.
  276.  
  277.     INPUTS
  278.         RGBFormat = RGB format to convert the color to.
  279.         Color = 32 bit ARGB color value.
  280.  
  281.     RESULT
  282.         Value = representation value for the given color value in
  283.                 the target RGB format.
  284.  
  285.     SEE ALSO
  286.         --color formats--
  287.  
  288. Picasso96API.library/p96FreeBitMap
  289.     NAME
  290.         p96FreeBitMap -- Free a Picasso96 BitMap
  291.  
  292.     SYNOPSIS
  293.         p96FreeBitMap(bm);
  294.                       a0
  295.         
  296.         void p96FreeBitMap(struct BitMap *)
  297.  
  298.     FUNCTION
  299.         Frees BitMap and associated graphics memory
  300.  
  301.     INPUTS
  302.         bm = a pointer to a BitMap structure. Passing NULL is ok (a NOP).
  303.  
  304.     SEE ALSO
  305.         p96AllocBitMap()
  306.  
  307. Picasso96API.library/p96FreeModeListTagList
  308.     NAME
  309.         p96FreeModeList -- free mode list
  310.  
  311.     SYNOPSIS
  312.         p96FreeModeList(ModeList)
  313.                            a0
  314.  
  315.         void p96FreeModeList(struct List *)
  316.  
  317.     FUNCTION
  318.         p96FreeModeList() deallocates the entire list allocated by a
  319.         previous call to p96AllocModeListTagList().
  320.  
  321.     INPUTS
  322.         List returned by p96AllocModeListTagList().
  323.  
  324.     SEE ALSO
  325.         p96AllocModeListTagList()
  326.  
  327. Picasso96API.library/p96GetBitMapAttr
  328.     NAME
  329.         p96GetBitMapAttr -- Returns information about a Picasso96 BitMap
  330.  
  331.     SYNOPSIS
  332.         value=p96GetBitMapAttr(bm, attribute_number)
  333.           d0                   a0          d0
  334.  
  335.         ULONG p96GetBitMapAttr(struct BitMap *, ULONG)
  336.  
  337.     FUNCTION
  338.         Query function to get information about a Picasso96 BitMap, similar
  339.         to graphics.library/GetBitMapAttr.
  340.  
  341.     INPUTS
  342.         bm = pointer to a valid Picasso96 BitMap
  343.         attribute_number = one of these:
  344.             P96BMA_WIDTH          returns the width of the bitmap in pixels
  345.             P96BMA_HEIGHT         returns the height of the bitmap in lines
  346.             P96BMA_DEPTH          returns number of memory bits per pixel
  347.             P96BMA_BYTESPERPIXEL  returns number of bytes per pixel
  348.             P96BMA_BITSPERPIXEL   returns number of valid bits per pixel
  349.             P96BMA_RGBFORMAT      returns the pixel format of the bitmap
  350.             P96BMA_ISP96          returns TRUE if the bitmap is a P96 one
  351.  
  352.     you must have locked the bitmap with p96LockBitMap() before calling
  353.         p96GetBitMapAttr() with one of the following attributes, or you may
  354.         get incorrect results!
  355.         
  356.             P96BMA_BYTESPERROW    returns BytesPerRow of the supplied bitmap
  357.             P96BMA_MEMORY         returns current memory location
  358.             P96BMA_ISONBOARD      returns TRUE if the bitmap is on the board
  359.             P96BMA_BOARDMEMBASE   returns the board's memory base address if
  360.                                           the bitmap is on a board
  361.             P96BMA_BOARDIOBASE    returns the base address of the board's IO
  362.                                           registers if the bitmap is on a board
  363.             P96BMA_BOARDMEMIOBASE returns the base address of the board's MEMIO
  364.                                           registers if the bitmap is on a board
  365.  
  366.     RESULT
  367.         value = result of the query
  368.  
  369.     SEE ALSO
  370.         graphics.library/GetBitMapAttr()
  371.  
  372. Picasso96API.library/p96GetBoardDataTagList
  373.     NAME
  374.         p96GetBoardDataTagList -- Returns information about a Picasso96 board
  375.         p96GetBoardDataTags -- Varargs stub for p96GetBoardDataTagList
  376.  
  377.     SYNOPSIS
  378.         value=p96GetBoardDataTagList(board_number, taglist)
  379.           d0                              d0         a0
  380.  
  381.         LONG p96GetBoardDataTagList(ULONG, struct TagItem *);
  382.  
  383.         value=p96GetBoardDataTags(board_number, Tag1, ...)
  384.  
  385.         LONG p96GetBoardDataTags(ULONG, ULONG, ... );
  386.  
  387.     FUNCTION
  388.         Query function to get information about a Picasso96 board. You
  389.         can get some constants, strings and variables you can use to
  390.         figure out the configuration of the host system and run time
  391.         information on which you should not depend too heavily.
  392.  
  393.     INPUTS
  394.         board_number = ordinal number of the Picasso96 board to query
  395.         taglist: the ti_Data must hold a pointer to a variable to hold
  396.                  the resulting value or pointer.
  397.             P96BD_BoardName       returns a string pointer to the board name
  398.             P96BD_ChipName        the same thing for the VGA chip
  399.             P96BD_TotalMemory     the total number of bytes available for
  400.                                   bitmaps
  401.             P96BD_FreeMemory      the number of currently free bytes (this
  402.                                   function does not lock to gather this
  403.                                   information so it could change before
  404.                                   you get the result; use only for tools
  405.                                   that display free memory and the like)
  406.             P96BD_LargestFreeMemory   returns the size of the largest
  407.                                   chunk of free memory
  408.             P96BD_MonitorSwitch   returns the state of the monitor switch
  409.                                   of the board: 0 = Amiga signal is shown,
  410.                                   otherwise board signal is supplied to the
  411.                                   output connector. Does not necessarily work
  412.                                   with each and every board.
  413.             P96BD_RGBFormats      gets the RGB format flag field with all
  414.                                   usable RGBFF_#?'s for that board
  415.             P96BD_MemoryClock     queries the current memory clock of the
  416.                                   board (this should only be used by debug
  417.                                   programs to help developers to track down
  418.                                   problems)
  419.  
  420.     RESULT
  421.         value = number of successfully processed tags or -1 for an invalid 
  422.                 board number
  423.  
  424.     SEE ALSO
  425.         p96GetRTGDataTagList()
  426.  
  427. Picasso96API.library/p96GetModeIDAttr
  428.     NAME
  429.         p96GetModeIDAttr -- Returns information about a Picasso96 mode
  430.  
  431.     SYNOPSIS
  432.         value=p96GetModeIDAttr(DisplayID, attribute_number)
  433.           d0                      d0              d1
  434.  
  435.         ULONG p96GetModeIDAttr(ULONG, ULONG)
  436.  
  437.     FUNCTION
  438.         Query function to get information about a Picasso96 mode.
  439.         As you can not get all information about a display mode by calling
  440.         graphics.library/GetDisplayInfoData, this function supplies some
  441.         attributes which may be of some interest. 
  442.  
  443.     INPUTS
  444.         DisplayID = a DisplayID, preferably a Picasso96 one
  445.         attribute_number = one of these:
  446.             P96IDA_WIDTH          returns the standard width of the mode
  447.                                           in pixels
  448.             P96IDA_HEIGHT         returns the standard height of the mode
  449.                                           in lines
  450.             P96IDA_DEPTH          returns number of memory bits per pixel
  451.             P96IDA_BYTESPERPIXEL  returns number of bytes per pixel
  452.             P96IDA_BITSPERPIXEL   returns number of valid bits per pixel
  453.             P96IDA_RGBFORMAT      returns the pixel format of the mode
  454.             P96IDA_ISP96          returns TRUE if supplied mode is a P96 one
  455.             P96IDA_BOARDNUMBER    returns number of the Picasso96 board
  456.                                           that belongs to this mode
  457.             P96IDA_STDBYTESPERROW returns number of bytes per row for
  458.                                           screens using STDSCREENWIDTH
  459.             P96IDA_BOARDNAME      returns name of the Picasso96 board
  460.                                           that belongs to this mode
  461.             P96IDA_COMPATIBLEFORMATS
  462.                                   returns the flags of all RGBFormats that
  463.                                           can be accessed simultaneously to
  464.                                           a screen with this mode without
  465.                                           reconfiguring the memory access
  466.                                           (for unlocked direct access checks)
  467.             P96IDA_VIDEOCOMPATIBLE
  468.                                   returns set TRUE to allow only modes that
  469.                                           are video compatible (e.g. Pablo)  
  470.                                           
  471.             P96IDA_PABLOIVCOMPATIBLE
  472.                                   returns TRUE if this mode can generate
  473.                                           video output on PabloIV (PicassoIV
  474.                                           add-on module)
  475.  
  476.             P96IDA_PALOMAIVCOMPATIBLE
  477.                                   returns TRUE if PalomaIV (PicassoIV add-on
  478.                                           module) can create a video overlay
  479.                                           on this mode 
  480.  
  481.     RESULT
  482.         value = result of the query or -1 for an invalid query id
  483.  
  484.     SEE ALSO
  485.         p96GetBitMapAttr(), graphics.library/GetDisplayInfoData()
  486.  
  487. Picasso96API.library/p96GetRTGDataTagList
  488.     NAME
  489.         p96GetRTGDataTagList -- Get global informations about Picasso96
  490.         p96GetRTGDataTags -- Varargs stub for p96GetRTGDataTagList
  491.  
  492.     SYNOPSIS
  493.         value=p96GetRTGDataTagList(taglist)
  494.           d0                         a0
  495.  
  496.         LONG p96GetRTGDataTagList(struct TagItem *);
  497.  
  498.         value=p96GetRTGDataTags(Tag1, ...)
  499.  
  500.         LONG p96GetRTGDataTags(ULONG, ... );
  501.  
  502.     FUNCTION
  503.         Query function to get information about global Picasso96 RTG
  504.         variables. Currently there is only one value which might be of
  505.         general interest, others may follow.
  506.  
  507.     INPUTS
  508.         taglist: the ti_Data must hold a pointer to a variable to hold
  509.                  the resulting value or pointer.
  510.             P96RD_NumberOfBoards    returns the number of currently
  511.                                     installed and active graphics boards
  512.  
  513.     RESULT
  514.         value = number of successfully processed tags
  515.  
  516.     SEE ALSO
  517.         p96GetBoardDataTagList()
  518.  
  519. Picasso96API.library/p96LockBitMap
  520.     NAME
  521.         p96LockBitMap -- Lock BitMap against relocation
  522.  
  523.     SYNOPSIS
  524.         lock = p96LockBitMap(bm, buf, size)
  525.          d0                  a0  a1    d0
  526.  
  527.         LONG p96LockBitMap(struct BitMap *, UBYTE *, ULONG)
  528.         
  529.     FUNCTION
  530.         This function prevents the Picasso96 system from moving the
  531.         BitMap to another location. Use this function only to protect
  532.         direct accesses to the BitMap memory. Call p96UnlockBitMap as
  533.         soon as you are done. Never hold the lock for longer than about
  534.         one second as all screen switching is disabled during you hold
  535.         this lock!
  536.         
  537.         During holding this lock, your task or process will get a higher
  538.         priority to help avoiding deadlocks.
  539.         
  540.     INPUTS
  541.         bm = Picasso96 BitMap to lock
  542.         buf = pointer to a RenderInfo struct buffer which will be filled
  543.         size = size of the buffer for the RenderInfo
  544.         
  545.     RESULT
  546.         lock = handle to the lock. Do not try to interpret it in any way!
  547.         
  548.     NOTE
  549.         Every call to this function MUST be matched with a call to
  550.         p96UnlockBitMap or your system will be blocked indefinetely!
  551.         Using functions of graphics.library or Picasso96API.library
  552.         while holding the lock is possible but should be avoided as
  553.         these functions lock the touched bitmaps internally.
  554.  
  555.     SEE ALSO
  556.         p96UnlockBitMap()
  557.  
  558. Picasso96API.library/p96PIP_Close
  559.     NAME
  560.         p96PIP_Close -- Close a Picasso96API PIP window
  561.  
  562.     SYNOPSIS
  563.         success = p96PIP_Close(Window)
  564.         
  565.         BOOL p96PIP_Close(struct Window *);
  566.  
  567.     FUNCTION
  568.         Closes a Picasso96API PIP window (and only these!).
  569.  
  570.     INPUTS
  571.         Window - pointer to PIP window created by p96PIP_OpenTagList,
  572.                  may be NULL which is a no-op.
  573.  
  574.     RESULT
  575.         success - TRUE if successful, FALSE otherwise
  576.  
  577.     SEE ALSO
  578.         p96PIP_OpenTagList
  579.  
  580. Picasso96API.library/p96PIP_GetTagList
  581.     NAME
  582.         p96PIP_GetTagList -- Get information about a Picasso96API PIP window
  583.         p96PIP_GetTags -- Varargs stub for p96PIP_GetTagList
  584.  
  585.     SYNOPSIS
  586.         total = p96PIP_GetTagList(Window, TagItems)
  587.          d0                          a0      a1
  588.  
  589.         ULONG p96PIP_GetTagList(struct Window *, struct TagItem *);
  590.         
  591.         total = p96PIP_GetTags(Window, Tag1, ...)
  592.         
  593.         ULONG p96PIP_GetTags(struct Window *, ULONG, ... );
  594.  
  595.     FUNCTION
  596.         p96PIP_GetTagList provides a way to query certain properties from a
  597.         Picasso96API PIP window.
  598.  
  599.     INPUTS
  600.         Window   - pointer to Picasso96API PIP window,
  601.         TagItems - currently any of these:
  602.             P96PIP_SourceBitMap - pointer to the bitmap containing the source
  603.                                   data, created by p96PIP_OpenTagList(). You
  604.                                   can use this bitmap similar to other Picasso96
  605.                                   bitmaps, like rendering into it using system
  606.                                   graphics functions.
  607.  
  608.             P96PIP_SourceRPort  - pointer to an unclipped rastport for the
  609.                                   source bitmap. More convenient if you want to
  610.                                   use rastport based graphics functions.
  611.  
  612.             P96PIP_Brightness   - unsigned long that determines the brightness
  613.                                   control value of the PIP. 0x00000000 stands
  614.                                   for the darkest (default) and 0xffffffff for
  615.                                   the brightest value.
  616.                                   
  617.     RESULT
  618.         total - number of tags processed.
  619.  
  620. Picasso96API.library/p96PIP_OpenTagList
  621.     NAME
  622.         p96PIP_OpenTagList -- Open a Picasso96API PIP window
  623.         p96PIP_OpenTags -- Varargs stub for p96PIP_OpenTagList
  624.  
  625.     SYNOPSIS
  626.         Window = p96PIP_OpenTagList(TagItems)
  627.           d0                           a0
  628.  
  629.         struct Window *p96PIP_OpenTagList(struct TagItem *);
  630.         
  631.         Window = p96PIP_OpenTags(Tag1, ... )
  632.         
  633.         struct Window *p96PIP_OpenTags(ULONG, ... );
  634.  
  635.     FUNCTION
  636.         Opens a Picasso96API picture-in-picture window. The window
  637.         behaves like a standard intuition window.
  638.  
  639.     INPUTS
  640.         Tags = most of the intuition/OpenWindowTags() tags and
  641.             P96PIP_SourceFormat - the RGBFormat of the source bitmap
  642.  
  643.             P96PIP_SourceWidth  - the width of the source bitmap
  644.  
  645.             P96PIP_SourceHeight - the height of the source bitmap
  646.  
  647.             P96PIP_Type         - PIP type, can currently be one of:
  648.                                   P96PIPT_MemoryWindow (default) or
  649.                                   P96PIPT_VideoWindow.
  650.  
  651.             P96PIP_ErrorCode    - optional pointer to a long word to receive any
  652.                                   error code which might occur. See includes for
  653.                                   possible failure reasons.
  654.  
  655.             P96PIP_Brightness   - unsigned long that determines the brightness
  656.                                   control value of the PIP. 0x00000000 stands
  657.                                   for the darkest (default) and 0xffffffff for
  658.                                   the brightest value.
  659.  
  660.                 P96PIP_Left         - PIP offset from the left and top edge of the
  661.                 P96PIP_Top            window's interior. If P96PIP_Relativity is
  662.                                   PIPRel_Right or PIPRel_Bottom then the these
  663.                                   values are relative to the right or bottom
  664.                                   edge of the window's interior (and negative).
  665.                                   (default is 0)
  666.  
  667.                 P96PIP_Width        - the dimensions of the PIP can be specified
  668.                 P96PIP_Height         directly, if the window's interior is used for
  669.                                   other GUI elements as well. P96PIP_Relativity
  670.                                   is used to choose whether the values are an
  671.                                   absolute size or the (negative) amount of
  672.                                   pixels reserved for non-PIP space at the right
  673.                                   or bottom of the window's interior if
  674.                                   PIPRel_Width or PIPRel_Height is set.
  675.  
  676.                 P96PIP_Relativity   - toggles the sense of P96PIP_Left, P96PIP_Top,
  677.                                   P96PIP_Width and P96PIP_Height.
  678.  
  679.             P96PIP_Colors
  680.             P96PIP_Colors32     - for CLUT PIPs on non-CLUT screens these tags
  681.                                   allow to set the PIP palette. See SA_Colors
  682.                                   and SA_Colors32 for details.
  683.                                   
  684.             P96PIP_InitialIntScaling
  685.                                 - force PIP to have an integer (non-fractional)
  686.                                   scaling factor at window open time (default
  687.                                   is FALSE). This will not forbid sizing.
  688.  
  689.             P96PIP_AllowCropping
  690.                                 - allow PIP to be cropped right and bottom, if
  691.                                   the source data cannot be scaled down further
  692.                                   (default is FALSE).
  693.  
  694.  
  695.         At this time, these tags are not valid and ignored:
  696.             WA_Width, WA_Height (use the WA_Inner... tags),
  697.             WA_SuperBitMap, WA_GimmeZeroZero, WA_BackFill.
  698.  
  699.     RESULT
  700.         Window = window handle
  701.  
  702.     SEE ALSO
  703.         intuition/OpenWindowTags()
  704.  
  705. Picasso96API.library/p96PIP_SetTagList
  706.     NAME
  707.         p96PIP_SetTagList -- Modify attributes of a Picasso96API PIP window
  708.         p96PIP_SetTags -- Varargs stub for p96PIP_SetTagList
  709.  
  710.     SYNOPSIS
  711.         total = p96PIP_SetTagList(Window, TagItems)
  712.          d0                          a0      a1
  713.  
  714.         ULONG p96PIP_SetTagList(struct Window *, struct TagItem *);
  715.         
  716.         total = p96PIP_SetTags(Window, Tag1, ...)
  717.         
  718.         ULONG p96PIP_SetTags(struct Window *, ULONG, ... );
  719.  
  720.     FUNCTION
  721.         p96PIP_SetTagList provides a way to modify certain properties of a
  722.         Picasso96API PIP window.
  723.  
  724.     INPUTS
  725.         Window   - pointer to Picasso96API PIP window,
  726.         TagItems - currently any of these:
  727.  
  728.             P96PIP_Brightness   - unsigned long that determines the brightness
  729.                                   control value of the PIP. 0x00000000 stands
  730.                                   for the darkest (default) and 0xffffffff for
  731.                                   the brightest value.
  732.  
  733.             P96PIP_Colors
  734.             P96PIP_Colors32     - for CLUT PIPs on non-CLUT screens these tags
  735.                                   allow to set the PIP palette. See SA_Colors
  736.                                   and SA_Colors32 for details.
  737.                                   
  738.     RESULT
  739.         total - number of tags processed.
  740.  
  741. Picasso96API.library/p96OpenScreenTagList
  742.     NAME
  743.         p96OpenScreenTagList -- Open a Picasso96API screen
  744.  
  745.     SYNOPSIS
  746.         screen = p96OpenScreenTagList(Tags)
  747.           d0                           a0
  748.  
  749.         struct Screen *p96OpenScreenTagList(struct TagItem *)
  750.  
  751.     FUNCTION
  752.         Opens a Picasso96API screen. The main difference to
  753.         intuition.library/OpenScreen is that extra handles an structures
  754.         for Picasso96API internal use are allocated and more options are
  755.         offered, which still are to be implemented.
  756.  
  757.     INPUTS
  758.         Tags = any of these which behave like OpenScreen tags:
  759.             P96SA_Left
  760.             P96SA_Top
  761.             P96SA_Width
  762.             P96SA_Height
  763.             P96SA_Depth
  764.             P96SA_DetailPen
  765.             P96SA_BlockPen
  766.             P96SA_Title
  767.             P96SA_Colors
  768.             P96SA_ErrorCode
  769.             P96SA_Font
  770.             P96SA_SysFont
  771.             P96SA_Type
  772.             P96SA_BitMap
  773.             P96SA_PubName
  774.             P96SA_PubSig
  775.             P96SA_PubTask
  776.             P96SA_DisplayID
  777.             P96SA_DClip
  778.             P96SA_ShowTitle
  779.             P96SA_Behind
  780.             P96SA_Quiet
  781.             P96SA_AutoScroll
  782.             P96SA_Pens
  783.             P96SA_SharePens
  784.             P96SA_BackFill
  785.             P96SA_Colors32
  786.             P96SA_VideoControl
  787.  
  788.         and:
  789.             P96SA_RGBFormat     RGBFormat for screen (which must be
  790.                                 compatible to a given P96SA_DisplayID).
  791.                 
  792.             P96SA_NoSprite      Do not show mouse sprite (BOOL).
  793.  
  794.             P96SA_NoMemory      Dumb render screen without backup memory.
  795.                                 Drawing on this Screen will only be done
  796.                                 if it is located in memory of a graphics
  797.                                 card (use ScreenToFront()) and anything
  798.                                 drawn will be discarded when the screen
  799.                                 leaves the card.
  800.             
  801.             P96SA_RenderFunc    Custom hook function, will be called when
  802.                                 screen is put to card. Usefull with no
  803.                                 memory render screens (P96SA_NoMemory).
  804.  
  805.             P96SA_SaveFunc      Will be called when screen has to leave card.
  806.                                 Usefull with no memory render screens.
  807.  
  808.             P96SA_Alignment     Screen base address on board and in memory
  809.                                 will be aligned to argument which must be a
  810.                                 power of two, e.g. 4096, 32768 etc...
  811.                                 This is mainly for MMU based emulator drivers,
  812.                                 which use a virtual frame buffer e.g. for
  813.                                 ShapeShifter.
  814.  
  815.             *** NEW *** Not yet implemented! ***
  816.             P96SA_DirectAccess  For drivers that need direct access to the
  817.                                 VGA hardware. This also implies RenderFunc
  818.                                 and SaveFunc in which you will have to save
  819.                                 or write your video memory and register
  820.                                 settings. You will have to allocate and use
  821.                                 your own screen backup memory. You will
  822.                                 always get a Picasso96 compatible setting
  823.                                 when activated again.
  824.                                 ti_Data points a variable to hold a pointer
  825.                                 to the direct access handle.
  826.                                 Do not use this unless really necessary!
  827.  
  828.     RESULT
  829.         screen = pointer to a Picasso96API-screen or NULL for failure.
  830.                     
  831.     SEE ALSO
  832.         intuition.library/OpenScreen()
  833.  
  834. Picasso96API.library/p96ReadPixel
  835.     NAME
  836.         p96ReadPixel -- read the ARGB color value of a pixel
  837.  
  838.     SYNOPSIS
  839.         color=p96ReadPixel(rp, x, y);
  840.           d0               a1  d0 d1
  841.  
  842.         ULONG p96ReadPixel(struct RastPort *, UWORD, UWORD);
  843.         
  844.     FUNCTION
  845.         Behaves similar to graphics.library/ReadPixel except that it does
  846.         not return a pen value, but the ARGB value of a pixel.
  847.  
  848.     INPUTS
  849.         rp = pointer to a RastPort structure
  850.         (x,y) = a point in this RastPort
  851.  
  852.     RESULT
  853.         color = ARGB value of the pixel in the RastPort at position (x,y)
  854.  
  855.     SEE ALSO
  856.         graphics.library/ReadPixel()
  857.  
  858. Picasso96API.library/p96ReadPixelArray
  859.     NAME
  860.         p96ReadPixelArray -- read pen values of a rectangular area
  861.  
  862.     SYNOPSIS
  863.         p96ReadPixelArray(ri, DestX, DestY, rp, SrcX, SrcY, SizeX, SizeY)
  864.                           a0   d0     d1    a1   d2    d3    d4     d5
  865.  
  866.         void p96ReadPixelArray(struct RenderInfo *, UWORD, UWORD,
  867.               struct RastPort *, UWORD, UWORD, UWORD, UWORD)
  868.     
  869.     FUNCTION
  870.         Reads the pen values of all pixels in a rectangular area of the
  871.         RastPort to memory area specified in the RenderInfo.
  872.         
  873.     INPUTS
  874.         ri = pointer to a RenderInfo structure
  875.         (DestX, DestY) = starting point in the memory area described by the
  876.                          RenderInfo
  877.         rp = pointer to a RastPort structure
  878.         (SrcX, SrcY) = starting point in the RastPort
  879.         (SizeX, SizeY) = size of the RastPort area which will be read
  880.  
  881.     RESULT
  882.         The area specified by the RenderInfo will be filled with the pen
  883.         values of the corresponding pixels in the RastPort.
  884.  
  885.     SEE ALSO
  886.         graphics.library/ReadPixelArray()
  887.  
  888. Picasso96API.library/p96ReadTrueColorData
  889.     NAME
  890.         p96ReadTrueColorData -- read RGB data from Hi- or TrueColor RastPort
  891.  
  892.     SYNOPSIS
  893.         p96ReadTrueColorData(tci, DestX, DestY, rp, SrcX, SrcY, SizeX, SizeY)
  894.                              a0    d0     d1    a1   d2    d3    d4     d5
  895.  
  896.         void p96ReadTrueColorData(struct TrueColorInfo *, UWORD, UWORD,
  897.               struct RastPort *, UWORD, UWORD, UWORD, UWORD)
  898.     
  899.     FUNCTION
  900.         This function reads RGB data specified in the TrueColorInfo structure
  901.         from a rectangular area within the rastport. This is necessary if the RGB
  902.         data is not in one of the supported RGBFormats, e.g. separated red,
  903.         green and blue data areas. Otherwise you should use p96ReadPixelArray().
  904.         
  905.     INPUTS
  906.         tci = pointer to a TrueColorInfo structure
  907.         (DestX, DestY) = starting point in the RGB data area described by the
  908.                        TrueColorInfo
  909.         rp = pointer to a RastPort structure
  910.         (SrcX, SrcY) = starting point in the RastPort
  911.         (SizeX, SizeY) = size of the RastPort area which will be read
  912.  
  913.     RESULT
  914.         The graphics data in the RastPort will be transfered to the RGB data
  915.         area specified in the TrueColorInfo.
  916.  
  917.     SEE ALSO
  918.         p96ReadPixelArray()
  919.  
  920. Picasso96API.library/p96RectFill
  921.     NAME
  922.         p96RectFill -- fill a rectangular area in a RastPort with a ARGB color
  923.  
  924.     SYNOPSIS
  925.         p96RectFill(rp, MinX, MinY, MaxX, MaxY, color)
  926.                     a1   d0    d1    d2    d3    d4
  927.  
  928.         void p96RectFill(struct RastPort *, UWORD, UWORD, UWORD, UWORD, ULONG)
  929.  
  930.     FUNCTION
  931.         This function is similar to graphics.library/RectFill, except that it
  932.         uses the ARGB value supplied as the color to fill with.
  933.  
  934.     INPUTS
  935.         rp = pointer to a RastPort structure
  936.         (MinX,MinY,MaxX,MaxY) describe the rectangle
  937.         color = ARGB value used for the fill operation
  938.  
  939.     SEE ALSO
  940.         graphics.library/RectFill()
  941.  
  942. Picasso96API.library/p96RequestModeIDTagList
  943.     NAME
  944.         p96RequestModeIDTagList -- launch DisplayID requester
  945.         p96RequestModeIDTags -- varargs stub for p96RequestModeIDTagList
  946.  
  947.     SYNOPSIS
  948.         DisplayID = p96RequestModeIDTagList(Tags)
  949.             d0                               a0
  950.  
  951.         DisplayID = p96RequestModeIDTags(Tags)
  952.             d0                           stack
  953.         
  954.         ULONG p96RequestModeIDTagList(struct TagItem *)
  955.         ULONG p96RequestModeIDTags(ULONG Tags, ...)
  956.  
  957.     FUNCTION
  958.         User chooses DisplayID from a requester.
  959.  
  960.     INPUTS
  961.         Tags = any of:
  962.             P96MA_MinWidth
  963.             P96MA_MinHeight
  964.             P96MA_MinDepth
  965.                 minimum dimensions of allowed modes.
  966.             P96MA_MaxWidth
  967.             P96MA_MaxHeight
  968.             P96MA_MaxDepth
  969.                 maximum dimensions of allowed modes.
  970.             P96MA_DisplayID
  971.                 prefered DisplayID.
  972.             P96MA_FormatsAllowed
  973.                 a mask consisting of all RGB formats which may be
  974.                 displayed in the requester.
  975.             P96MA_FormatsForbidden
  976.                 a mask consisting of all RGB formats which may not be
  977.                 displayed in the requester.
  978.             P96MA_WindowTitle
  979.                 pointer to the name for the requester window. Defaults to
  980.                 "Picasso96 - Best Mode".
  981.             P96MA_OKText
  982.                 string will be displayed in the 'Ok' button.
  983.             P96MA_CancelText
  984.                 string will be displayed in the 'Cancel' button.
  985.             P96MA_Window
  986.                 the requester will be displayed on the same screen as the
  987.                 supplied window.
  988.             P96MA_PubScreenName
  989.                 name of the public screen requester will be opened upon.
  990.             P96MA_Screen
  991.                 pointer to screen where the requester will be opened.
  992.             P96MA_VideoCompatible
  993.                 set TRUE to allow only modes that are video compatible
  994.                 (e.g. Pablo)
  995.             P96MA_PabloIVCompatible
  996.                 set TRUE to allow only modes that can be used for output
  997.                 on PabloIV
  998.             P96MA_PalomaIVCompatible
  999.                 set TRUE to allow only modes that can display PalomaIV input
  1000.  
  1001.     RESULT
  1002.         DisplayID = a valid DisplayID or INVALID_ID
  1003.  
  1004. Picasso96API.library/p96UnlockBitMap
  1005.     NAME
  1006.         p96UnlockBitMap -- unlock a Picasso96 BitMap
  1007.  
  1008.     SYNOPSIS
  1009.         p96UnlockBitMap(bm, lock)
  1010.                         a0   d0
  1011.  
  1012.         void p96UnlockBitMap(struct BitMap *, LONG)
  1013.  
  1014.     FUNCTION
  1015.         This function releases the BitMap lock obtained by a prior call
  1016.         to p96LockBitMap.
  1017.  
  1018.     INPUTS
  1019.         bm = BitMap to a locked Picasso96 BitMap
  1020.         lock = lock obtained with p96LockBitMap
  1021.  
  1022.     SEE ALSO
  1023.         p96LockBitMap()
  1024.  
  1025. Picasso96API.library/p96WritePixel
  1026.     NAME
  1027.         p96WritePixel -- Write an ARGB pixel
  1028.  
  1029.     SYNOPSIS
  1030.         result=p96WritePixel(rp, x, y, color);
  1031.           d0                 a1  d0 d1  d2
  1032.  
  1033.         ULONG p96WritePixel(struct RastPort *, UWORD, UWORD, ULONG);
  1034.         
  1035.     FUNCTION
  1036.         Behaves similar to graphics.library/WritePixel except that it does
  1037.         not use a pen value, but the ARGB value of a pixel.
  1038.  
  1039.     INPUTS
  1040.         rp = pointer to a RastPort structure
  1041.         (x,y) = a point in this RastPort
  1042.         color = ARGB color value for the pixel
  1043.  
  1044.     RESULT
  1045.         currently, this function always returns NULL
  1046.  
  1047.     SEE ALSO
  1048.         graphics.library/WritePixel()
  1049.  
  1050. Picasso96API.library/p96WritePixelArray
  1051.     NAME
  1052.         p96WritePixelArray -- Write pen values of a rectangular area
  1053.  
  1054.     SYNOPSIS
  1055.         p96WritePixelArray(ri, SrcX, SrcY, rp, DestX, DestY, SizeX, SizeY)
  1056.                            a0   d0    d1   a1   d2     d3     d4     d5
  1057.  
  1058.         void p96WritePixelArray(struct RenderInfo *, UWORD, UWORD,
  1059.               struct RastPort *, UWORD, UWORD, UWORD, UWORD)
  1060.     
  1061.     FUNCTION
  1062.         Writes the pen values of all pixels in the memory area specified in
  1063.         the RenderInfo to a rectangular area of the RastPort.
  1064.         
  1065.     INPUTS
  1066.         ri = pointer to a RenderInfo structure
  1067.         (SrcX, SrcY) = starting point in the memory area described by the
  1068.                        RenderInfo
  1069.         rp = pointer to a RastPort structure
  1070.         (DestX, DestY) = starting point in the RastPort
  1071.         (SizeX, SizeY) = size of the RastPort area which will be written
  1072.  
  1073.     RESULT
  1074.         The pixels in the RastPort will be filled with the pen values
  1075.         specified in the corresponding area in the RenderInfo.
  1076.  
  1077.     SEE ALSO
  1078.         graphics.library/WritePixelArray()
  1079.  
  1080. Picasso96API.library/p96WriteTrueColorData
  1081.     NAME
  1082.         p96WriteTrueColorData -- write RGB data to Hi- or TrueColor RastPort
  1083.  
  1084.     SYNOPSIS
  1085.         p96WriteTrueColorData(tci, SrcX, SrcY, rp, DestX, DestY, SizeX, SizeY)
  1086.                               a0    d0    d1   a1   d2     d3     d4     d5
  1087.  
  1088.         void p96WriteTrueColorData(struct TrueColorInfo *, UWORD, UWORD,
  1089.               struct RastPort *, UWORD, UWORD, UWORD, UWORD)
  1090.     
  1091.     FUNCTION
  1092.         This function fills RGB data specified in the TrueColorInfo structure
  1093.         to a rectangular area within the rastport. This is necessary if the RGB
  1094.         data is not in one of the supported RGBFormats, e.g. separated red,
  1095.         green and blue data areas. Otherwise you should use p96WritePixelArray().
  1096.         
  1097.     INPUTS
  1098.         tci = pointer to a TrueColorInfo structure
  1099.         (SrcX, SrcY) = starting point in the RGB data area described by the
  1100.                        TrueColorInfo
  1101.         rp = pointer to a RastPort structure
  1102.         (DestX, DestY) = starting point in the RastPort
  1103.         (SizeX, SizeY) = size of the RastPort area which will be written
  1104.  
  1105.     RESULT
  1106.         The pixels in the RastPort will be filled with the RGB data
  1107.         specified in the corresponding area in the TrueColorInfo.
  1108.  
  1109.     SEE ALSO
  1110.         p96WritePixelArray()
  1111.  
  1112.